package o;

import android.app.Application;
import android.content.Context;
import android.content.IntentFilter;
import com.huawei.appgallery.foundation.ui.framework.widget.button.ButtonFactory;
import com.huawei.appgallery.foundation.ui.framework.widget.button.DownloadButton;
import com.huawei.appgallery.search.api.view.AutoSearchDownloadButton;
import com.huawei.appmarket.service.appdetail.view.widget.DetailDownloadButton;
import com.huawei.appmarket.service.appmgr.view.widget.FeatureSupportDownloadButton;
import com.huawei.appmarket.service.appmgr.view.widget.InstallButton;
import com.huawei.appmarket.service.appprofile.AppProfileResultReceiver;
import com.huawei.appmarket.service.installresult.control.InstallerReceiver;
import com.huawei.appmarket.support.thirdprovider.appvalidate.AppValidateInfoManagerIml;
import com.huawei.fastengine.fastview.startFastappEngine.appmarket.QueryDetailHanlderRegister;
import o.ewm.n;

public class ewn {
    private Application ˊ;

    static class b implements euo {
        private b() {
        }

        public void ˎ(Context context) {
            if (!diu.ˊ().ˎ()) {
                cei.ॱ(context);
                fam.ॱ().ॱ(context);
            }
        }
    }

    public ewn(Application application) {
        this.ˊ = application;
        dot.ˏ();
        dvt.ˏ().ˊ();
        dqh.ॱ().ˏ();
        ccy o_dsq = new dsq();
        cdb.ॱ(cdf.class, o_dsq);
        cdb.ॱ(cdg.class, o_dsq);
        cdb.ॱ(cdm.class, o_dsq);
        cdb.ॱ(cdd.class, new dsj());
        cdb.ॱ(cdi.class, new dkm());
        cdb.ॱ(cde.class, new efj());
        cdb.ॱ(duh.class, new edr());
        cdb.ॱ(dwy.class, new dpe());
        ButtonFactory.ˎ(new djw());
        ButtonFactory.ˏ(DownloadButton.class, dkd.class);
        ButtonFactory.ˏ(FeatureSupportDownloadButton.class, dkd.class);
        ButtonFactory.ˏ(enb.class, dkd.class);
        ButtonFactory.ˏ(AutoSearchDownloadButton.class, dkd.class);
        ButtonFactory.ˏ(InstallButton.class, dto.class);
        ButtonFactory.ˏ(DetailDownloadButton.class, drs.class);
        ckp.ˋ(new dkr());
        cdb.ॱ(cds.class, new dvx());
        cdb.ॱ(cfb.class, new epc());
        cdb.ॱ(cfg.class, new AppValidateInfoManagerIml());
        cdb.ॱ(cfj.class, new ejt());
        dss.ॱ().ॱ(new dtn());
        dss.ॱ().ˎ(new dtp());
        eup.ॱ().ˎ("WisedistApplication", ˏ());
        cdb.ॱ(eti.class, new efl());
        cdb.ॱ(ceq.class, new dsu());
    }

    private static euo ˏ() {
        return new b();
    }

    private void ˊ() {
        dmq.ˏ.ˋ(new dmr(dmp.CONCURRENT, dmn.NORMAL, new e(null)));
    }

    public void ˋ() {
        NetWorkUtil.getNetInfo(this.ˊ);
        dor.ˏ();
        dvb.ˋ();
        dvc.ˎ();
        com.huawei.appmarket.service.activitydispatcher.OpenGateway.b.ˏ();
        dyu.ॱ();
        drp.ˋ();
        dvt.ˏ().ˋ();
        dqh.ॱ().ˎ();
        eop.ˏ();
        QueryDetailHanlderRegister.registerHanlder(ejq.class);
        ᐝ();
        ʼ();
        ˎ();
        eeh.ˋ();
        ecf.ˏ().ˊ(false);
        ((cdf) cdb.ॱ(cdf.class)).ॱ(this.ˊ);
        ((cdf) cdb.ॱ(cdf.class)).ˎ();
        ((cut) fho.ˏ().ˋ("RealName").ॱ(cut.class)).ˎ();
        esi.ˎ();
        evr.ˊ().ͺ();
        ebn.ॱ().getValueRefName();
        euc.ˊ().ॱ();
        InstallerReceiver.register(this.ˊ);
        ˊ();
        ʻ();
        ॱॱ();
    }

    private void ˎ() {
        ((cwt) fho.ˏ().ˋ("Share").ॱ(cwt.class)).ˋ();
    }

    private void ᐝ() {
        ((cxc) fho.ˏ().ˋ("Share").ॱ(cxc.class)).ˏ(ejx.class);
    }

    private void ʻ() {
        fhz ˋ = fho.ˏ().ˋ("PackageManager");
        if (ˋ != null) {
            coa o_coa = (coa) ˋ.ॱ(coa.class);
            if (o_coa != null) {
                o_coa.ˋ(new etm());
                o_coa.ˎ(new etf());
                o_coa.ˏ(new etk());
                o_coa.ˊ(new etg());
            }
        }
    }

    private void ॱॱ() {
        ll.ˏ(this.ˊ).ˏ(new AppProfileResultReceiver(), new IntentFilter("AppProfile.DownloadResult"));
    }

    public void ॱ() {
        ButtonFactory.ˋ().ˎ();
        ʽ();
        eeh.ˏ();
        ((cdf) cdb.ॱ(cdf.class)).ˏ();
        euc.ˊ().ˏ();
        InstallerReceiver.unregister(this.ˊ);
        eup.ॱ().ˊ("WisedistApplication");
    }

    private void ʽ() {
        ((cwt) fho.ˏ().ˋ("Share").ॱ(cwt.class)).ˎ();
    }

    private void ʼ() {
        ewb.ˊ(n.ˋˉ);
        ewb.ˊ(n.ʽʼ);
        ewb.ˊ(n.ˉ);
        ewb.ˊ(n.ˎ);
        ewb.ˊ(n.ˋᐨ);
        ewb.ˊ(n.ˋˑ);
        ewb.ˊ(n.ʾ);
        ewb.ˊ(n.ॱˑ);
    }
}
